#i=5
#while i>0:
#    i=i-1
#    print(i,end=" ")

#求1+2+3+......+100的和
#i=1
#j=0
#while i<=100:
 #   j=j+i
  #  i=i+1
#print("1到100的和为%d"%j)


#for x in"abcd":
#    print(x)
#for y in range(2,6,3):
#    print(y)

#打印九九乘法表
for i in range(1,10):#横排1*？
    for j in range(1,10):
        s=i*j
        print("%d*%d=%2s"%(i,j,s),end=" ")

    print("\n")
print("\n")
#下三角
for i in range(1,10):#横排1*？
    for j in range(1,i+1):
        s=i*j
        print("%d*%d=%2s"%(i,j,s),end=" ")

    print("\n")
print("\n")

#上三角
for i in range(1,10):#横排1*？
    for j in range(1,10):
        s=i*j
        if j<i:
            print("      ",end=" ")
        else:
            print("%d*%d=%2s"%(i,j,s),end=" ")

    print("\n")
